//
//  BaseViewController.m
//  SubspecTest
//
//  Created by Fane on 2019/10/21.
//

#import "BaseViewController.h"

@interface BaseViewController ()

@end

@implementation BaseViewController
- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        if (!nibNameOrNil || nibNameOrNil.length < 1) {
            nibNameOrNil = NSStringFromClass(self.class);
        }
        
        if (!nibBundleOrNil) {
            nibBundleOrNil = [NSBundle bundleForClass:self.class];
        }
        
        self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    }
    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = UIColor.whiteColor;
}

- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    [self.navigationController setNavigationBarHidden:self.naviHidden animated:animated];
}

- (void)viewWillDisappear:(BOOL)animated{
    [self.navigationController setNavigationBarHidden:self.naviHidden animated:animated];
    [super viewWillDisappear:animated];
}

#pragma mark - help methods -

@end
